-
Notifications
You must be signed in to change notification settings - Fork 3.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reveng: Only get NONCLUSTERED and CLUSTERED indexes from sys.indexes #3952
Conversation
to avoid name being NULL and also ignore other irrelevant index types https://msdn.microsoft.com/da-dk/library/ms173760.aspx Fixes some issues reported in #3861
I don't believe we support SPATIAL index (and others) in |
@lajones Yes, in order to avoid spatial and other index types, and to clarify the intent of GetIndexes |
@ErikEJ I'm with @natemcmaster I think it would be better to bring them back in the query and issue a warning message along the lines of "Index [{schemaName}].[{tableName}].[{indexName}] has type {typeDescription}. We only support CLUSTERED and NONCLUSTERED. Skipping index." (similar to what we already do for columns with types we don't understand). Note: we already bring back the |
@lajones That would also work, yes, but just looking at the type_desc seems quite brittle (type_desc could be called something else for other DBMS systems http://docs.oracle.com/cd/B19306_01/server.102/b14237/statviews_1069.htm#i1578369 ). I guess it also boils down to what you expect a provider to give you from GetIndexes (currently unclear). If that was documented, then it would probably make sense for a provider to limit the list of "indexes" returned to be actually something useful for reverse engineering |
@ErikEJ Yes - this is for SQL Server only i.e. Current plans for the |
So you prefer to deal with potentially hard to understand warnings for unsupported index types? |
Well I hope the warnings will be as helpful as we can make them, but, yes, essentially I'd rather have warnings rather than just ignore them without explanation. |
to avoid name being NULL and also ignore other irrelevant index types
https://msdn.microsoft.com/da-dk/library/ms173760.aspx
Fixes some of the issues reported in #3861